package com.guigu.tms.aggregation.controller;

import com.guigu.tms.aggregation.service.ITaskTransportService;
import com.guigu.tms.commons.aggregation.entity.TaskTransport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 运输任务表 前端控制器
 * </p>
 *
 * @author wj
 * @since 2022-10-21
 */
@RestController
@RequestMapping("/taskTransport")
public class TaskTransportController {
    @Autowired
    private ITaskTransportService taskTransportService;

    @PostMapping("createTaskTransport")
    public boolean createTaskTransport(@RequestBody TaskTransport taskTransport){
        return taskTransportService.createTaskTransport(taskTransport);
    }

    @PostMapping("updateTaskTransport")
    public boolean updateTaskTransport(@RequestBody TaskTransport taskTransport){
        return taskTransportService.updateTaskTransport(taskTransport);
    }

    @PutMapping("updateTaskTransportById")
    public boolean updateTaskTransportById(@RequestBody TaskTransport taskTransport){
        return taskTransportService.updateById(taskTransport);
    }


}
